package com.example.projects;

import android.os.Bundle;
import android.view.View;
import android.widget.EditText;

public class Edit extends CPT3004Menu {

	@Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.barcodeedit);
    }

    public void sendEditBarcode(View view){
        EditText editText = (EditText) findViewById(R.id.edit_barcode);
        String message = editText.getText().toString();
        
        if(!message.isEmpty()){
        	AccessDatabase ad = new AccessDatabase(this);
            ad.execute(message, getFilesDir().getAbsolutePath(), "main");	
        	
        }
        else{
        	
        	editText.setHint("Please enter the barcode.");
        }
        
        
    }	
}